package org.dxy.domain.event.workstation;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

import java.time.LocalDateTime;

/**
 * @description  事件：工位重置
 * <p>表示清除错误状态，恢复工位为初始或可调度状态。</p>
 * @date: 2025/6/18 22:09
 * @auther dxy
 */
@Value
@Builder
@AllArgsConstructor
public class WorkstationResetEvent implements DomainEvent {

    /**
     * 工位 ID
     */
    Long workstationId;

    /**
     * 重置操作人
     */
    String operator;

    /**
     * 重置时间
     */
    LocalDateTime resetAt;
    
    @Override
    public Long aggregateId() {
        return workstationId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }
    
    @Override
    public String eventType() {
        return WorkstationEventTypeEnum.RESET.getKey();
    }
}

